import request from './apis'
// Back pay， Run！Boss brute, four months back pay and he likes to withhold money,not recommended to stay
enum Api {
    weixiuhetong = '',
    guanlihetong = '/unit/YjFireExtinguisher/fireExtinguisherContractLists',
    guanlihetongAddOrUpdate = '/unit/YjFireExtinguisher/addFireExtinguisherContract',
    daoqichaxun = '/unit/YjFireExtinguisher/fireExtinguisherLists',
    daoqichaxunAddOrUpdate = 'unit/YjFireExtinguisher/addFireExtinguisher',
    weixiujianyan = '/unit/YjFireExtinguisher/fireExtinguisherRecordLists', //维修检验
    weixiujianyanAddOrUpdate = 'unit/YjFireExtinguisher/addFireExtinguisherRecord', //维修检验添加修改
    chuchangjiaoyan = '',
    recordListsExp = '/unit/YjFireExtinguisher/fireExtinguisherRecordListsExp',
    guoqiList = '/unit/YjFireExtinguisher/fireExtinguisherLists',
}

// 灭火器维修过程导出
export const recordListsExp = (data) => {
    return request.post(Api.recordListsExp, data, {
        responseType: 'blob'
    })
}
export const daoqichaxun = (params) => {
    return request.get(Api.daoqichaxun, { params })
}

export const guoqiList = (params) => {
    return request.get(Api.guoqiList, { params })
}

export const daoqichaxunAddOrUpdate = (data) => {
    return request.post(Api.daoqichaxunAddOrUpdate, data)
}
export const weixiujianyan = (data) => {
    return request.post(Api.weixiujianyan, data)
}
export const weixiujianyanAddOrUpdate = (data) => {
    return request.post(Api.weixiujianyanAddOrUpdate, data)
}

export const guanlihetong = (params) => {
    return request.get(Api.guanlihetong, { params })
}
export const guanlihetongAddOrUpdate = (data) => {
    return request.post(Api.guanlihetongAddOrUpdate, data)
}

